package com.compass.doctor.ui.setting.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.compass.doctor.R
import com.compass.doctor.databinding.LayoutDiagnoseItemBinding
import com.compass.doctor.databinding.LayoutExpensesItemBinding
import com.compass.framework.adapter.BaseBindViewHolder
import com.compass.framework.adapter.BaseRecyclerViewAdapter
import com.compass.framework.model.ArticleInfo
import com.compass.framework.model.Dictionaries
import java.text.SimpleDateFormat
import java.util.Locale

/**
 * Description： 资费金额Adapter
 * Date:2023/12/19 10:02
 */
class ExpensesAdapter : BaseRecyclerViewAdapter<Dictionaries, LayoutExpensesItemBinding>() {


    override fun getViewBinding(
        layoutInflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): LayoutExpensesItemBinding {
        return LayoutExpensesItemBinding.inflate(layoutInflater, parent, false)
    }

    override fun onBindDefViewHolder(
        holder: BaseBindViewHolder<LayoutExpensesItemBinding>,
        item: Dictionaries?,
        position: Int
    ) {
        if (item == null) return
        holder.binding.apply {
            tvName.text = item.label
            if (item.isSelect){
                imgChoose.setBackgroundResource(R.mipmap.ic_agreement_select)
            }else{
                imgChoose.setBackgroundResource(R.mipmap.ic_agreement_default)
            }

        }
    }
}